<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Exercises</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch06lev1sec11.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch07.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch06lev1sec12"></a>
<h3 class="docSection1Title">Exercises</h3>
<P><table border="0" cellspacing="16" cellpadding="0"><TR valign="top"><td align="right" class="docText" width="50"><a name="ch06qa1q1"></a><B><a class="docLink" href="app03lev1sec6.html#ch06qa1q1a1">6.1</a></b></TD><TD><p class="docText">If the system uses a shadow file and we need to obtain the encrypted password, how do we do it?</p></TD></TR><TR valign="top"><td align="right" class="docText" width="50"><a name="ch06qa1q2"></a><B><a class="docLink" href="app03lev1sec6.html#ch06qa1q2a2">6.2</a></b></td><TD><p class="docText">If you have superuser access and your system uses shadow passwords, implement the previous exercise.</P></TD></tr><TR valign="top"><TD align="right" class="docText" width="50"><a name="ch06qa1q3"></a><b>6.3</b></TD><TD><p class="docText">Write a program that calls <tt>uname</tt> and prints all the fields in the <tt>utsname</tt> structure. Compare the output to the output from the <tt>uname</tt>(1) command.</p></td></tr><tr valign="top"><TD align="right" class="docText" width="50"><a name="ch06qa1q4"></a><b>6.4</b></TD><td><p class="docText">Calculate the latest time that can be represented by the <tt>time_t</tt> data type. After it wraps around, what happens?</P></td></tr><tr valign="top"><td align="right" class="docText" width="50"><a name="ch06qa1q5"></a><b><a class="docLink" href="app03lev1sec6.html#ch06qa1q5a5">6.5</a></b></td><td><p class="docText">Write a program to obtain the current time and print it using <tt>strftime</tt>, so that it looks like the default output from <tt>date</tt>(1). Set the <tt>TZ</tt> environment variable to different values and see what happens.</p></td></tr></table></p>

<ul></ul></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch06lev1sec11.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch07.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--242-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--242-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
